<template>
  <div>
    <template>
      <div slot="header" class="clearfix" style="text-align: center;line-height: 30px">
        <h3>订单商品详情</h3>
      </div>

      <el-table
          :data="frontSaleGoods"
          border
          style="width: 100%">
        <el-table-column
            fixed
            prop="goodscode"
            label="商品编号">
        </el-table-column>
        <el-table-column
            prop="goodsname"
            label="商品名">
        </el-table-column>
        <el-table-column
            prop="goodstype"
            label="商品类型">
        </el-table-column>
        <el-table-column
            prop="specification"
            label="规格">
        </el-table-column>
        <el-table-column
            prop="sellprice"
            label="销售价格">
        </el-table-column>
        <el-table-column
            prop="goodsdescription"
            label="商品描述">
        </el-table-column>
        <el-table-column
            prop="goodsnum"
            label="商品购买数量">
        </el-table-column>
      </el-table>
      <br>
      <el-row>
        <el-col :span="24" style="text-align: center">
          <el-button type="primary" @click="onSubmit" >确定</el-button>
        </el-col>
      </el-row>
    </template>
  </div>
</template>

<script>
export default {
  name: "UserOrderGoods",
  props:{
    usercodeTag:String
  },
  data(){
    return{
      frontSaleGoods: []
    }
  },
  mounted() {
    this.init(this.usercodeTag)
  },
  methods:{
    init(tag){
      let url = '/csc/front-sale-goods/selectOnePageGoods/'+tag+'/'+1+'/'+100
      this.$axios.get(url).then(r=>{
        this.frontSaleGoods = r.data.records
      })
    },
    onSubmit(){
      this.$emit("closeDialog")
    }
  }
}
</script>

<style scoped>

</style>